﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace dsacbasic.Models
{
    public class RegisterViewModel
    {
        [Required(ErrorMessage="用户名必填")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "密码必填")]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [Required(ErrorMessage = "确定密码必填")]
        [Compare("Password",ErrorMessage="密码不匹配")]
        [DataType(DataType.Password)]
        public string Password2 { get; set; }
    }
}